-- GENERATED SPELL FOR [Zelfan] --


function spell0_24556(pUnit, Event) --@Drink Healing Potion,Self--
pUnit:FullCastSpellOnTarget(15503,pUnit)
pUnit:RegisterEvent('Sorts_24556', 570, 1)
end

function spell1_24556(pUnit, Event) --@Fel Iron Bomb,n/a--
pUnit:FullCastSpellOnTarget(46024,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24556', 3000, 1)
end

function spell2_24556(pUnit, Event) --@Fel Iron Bomb,n/a--
pUnit:FullCastSpellOnTarget(46184,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24556', 3000, 1)
end

function spell3_24556(pUnit, Event) --@Goblin Dragon Gun,Self--
pUnit:FullCastSpellOnTarget(44272,pUnit)
pUnit:RegisterEvent('Sorts_24556', 8000, 1)
end

function spell4_24556(pUnit, Event) --@Goblin Dragon Gun,Self--
pUnit:FullCastSpellOnTarget(46185,pUnit)
pUnit:RegisterEvent('Sorts_24556', 8000, 1)
end

function spell5_24556(pUnit, Event) --@High Explosive Sheep,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(44276,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_24556', 1, 1)
end

function spell6_24556(pUnit, Event) --@Medallion of Immunity,Self--
pUnit:FullCastSpellOnTarget(46227,pUnit)
pUnit:RegisterEvent('Sorts_24556', 289, 1)
end

function spell7_24556(pUnit, Event) --@Recombobulate,n/a--
pUnit:FullCastSpellOnTarget(44274,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24556', 576, 1)
end

function spell8_24556(pUnit, Event) --@Rocket Launch,n/a--
pUnit:FullCastSpellOnTarget(44137,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24556', 3500, 1)
end

function spell9_24556(pUnit, Event) --@Rocket Launch,n/a--
pUnit:FullCastSpellOnTarget(46187,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24556', 3500, 1)
end

function Sorts_24556(pUnit, Event)
local choix_sorts_24556 = math.random(0, 9)
if choix_sorts_24556 == 0 then
pUnit:RegisterEvent('spell0_24556', 1, 1)
end
if choix_sorts_24556 == 1 then
pUnit:RegisterEvent('spell1_24556', 1, 1)
end
if choix_sorts_24556 == 2 then
pUnit:RegisterEvent('spell2_24556', 1, 1)
end
if choix_sorts_24556 == 3 then
pUnit:RegisterEvent('spell3_24556', 1, 1)
end
if choix_sorts_24556 == 4 then
pUnit:RegisterEvent('spell4_24556', 1, 1)
end
if choix_sorts_24556 == 5 then
pUnit:RegisterEvent('spell5_24556', 1, 1)
end
if choix_sorts_24556 == 6 then
pUnit:RegisterEvent('spell6_24556', 1, 1)
end
if choix_sorts_24556 == 7 then
pUnit:RegisterEvent('spell7_24556', 1, 1)
end
if choix_sorts_24556 == 8 then
pUnit:RegisterEvent('spell8_24556', 1, 1)
end
if choix_sorts_24556 == 9 then
pUnit:RegisterEvent('spell9_24556', 1, 1)
end
end

function mob24556_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24556', math.random(1500, 3000), 1)
end

function mob24556_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24556_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24556_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24556, 1, 'mob24556_Action')
RegisterUnitEvent(24556, 2, 'mob24556_Leave')
RegisterUnitEvent(24556, 3, 'mob24556_Kill')
RegisterUnitEvent(24556, 4, 'mob24556_Die')
